package com.zkthink.ceres.member.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.zkthink.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 会员标签关联表
 * 
 * </p>
 *
 * @author kellen
 * @since 2020-07-12
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_member_tag_rel")
@ApiModel(value = "MemberTagRel", description = "会员标签关联表")
@AllArgsConstructor
public class MemberTagRel extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 标签id
     */
    @ApiModelProperty(value = "标签id")
    @NotNull(message = "标签id不能为空")
    @TableField("tag_id")
    @Excel(name = "标签id")
    private Long tagId;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id")
    @NotNull(message = "会员id不能为空")
    @TableField("mid")
    @Excel(name = "会员id")
    private Long mid;

    /**
     * 是否删除 0否 1是
     */
    @ApiModelProperty(value = "是否删除 0否 1是")
    @NotNull(message = "是否删除 0否 1是不能为空")
    @TableField("is_delete")
    @Excel(name = "是否删除 0否 1是")
    private Integer isDelete;


    @Builder
    public MemberTagRel(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long createUser, Long updateUser, 
                    Long tagId, Long mid, Integer isDelete) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.tagId = tagId;
        this.mid = mid;
        this.isDelete = isDelete;
    }

}
